﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using ZhimeiSoft.CharmManager.DOL;

namespace ZhimeiSoft.CharmManager.Server.DAL.Interface
{
    /// <summary>
    /// 预约信息
    /// </summary>
    public interface IReservationDAL
    {
        /// <summary>
        /// 增加预约信息
        /// </summary>
        void AddResveration(DBEntityReservation reservatioinInfo, DataSet dsReservationServiceItem);
        /// <summary>
        /// 获取预约ID
        /// </summary>
        /// <param name="reservationInfo"></param>
        /// <returns></returns>
        int GetReservationID(DBEntityReservation reservationInfo);
        /// <summary>
        /// 修改预约信息
        /// </summary>
        /// <param name="reservatioinInfo"></param>
        /// <param name="dsReservationServiceItem"></param>
        void UpdateReservation(DBEntityReservation reservatioinInfo, DataSet dsReservationServiceItem);
        /// <summary>
        /// 保存预约调整
        /// </summary>
        /// <param name="reservationInfo"></param>
        void UpdateAdjReservation(DBEntityReservation reservationInfo);
        /// <summary>
        /// 进行预约项目的合并
        /// </summary>
        /// <param name="adjReservation"></param>
        /// <param name="updateReservationID"></param>
        void UpdateAdjReservationServiceItem(int sourceReservationID, int targetReservationID);
        /// <summary>
        /// 更新预约状态
        /// </summary>
        /// <param name="reservationID"></param>
        /// <param name="customServiceItemID"></param>
        /// <param name="state"></param>
        void UpdateReservationCustomServiceItemState(int reservationID, int customServiceItemID, int employeeID, string state);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="reservationID"></param>
        /// <param name="employeeID"></param>
        void UpdateReservationEmployee(int reservationID, int employeeID);
        
        /// <summary>
        /// 更新预约明细数据
        /// </summary>
        /// <param name="dsReservationServiceItem"></param>
        void DeleteAdjReservationServiceItemDetail(DataSet dsReservationServiceItem);
        /// <summary>
        /// 删除预约项目
        /// </summary>
        /// <param name="reservationID">预约ID</param>
        void DeleteReservation(int reservationID);
        /// <summary>
        /// 跟据月份查询预约信息
        /// </summary>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <returns></returns>
        DataSet QueryReservationMonth(int queryYear, int queryMonth, string filter);
        /// <summary>
        /// 获取预约信息
        /// </summary>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <param name="queryDay">查询日</param>
        /// <param name="stateStr">预约状态</param>
        /// <returns></returns>
        DataSet QueryResveration(int queryYear, int queryMonth, int queryDay, string stateStr);
        /// <summary>
        /// 获取员工预约信息
        /// </summary>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <param name="queryDay">查询日</param>
        /// <param name="employeeID">员工ID</param>
        /// <param name="stateStr">预约状态</param>
        /// <returns></returns>
        DataSet QueryReservationEmployee(int queryYear, int queryMonth, int queryDay, int employeeID, string stateStr);
         /// <summary>
        /// 根据时间和会员查询预约
        /// </summary>
        /// <param name="querYear">年</param>
        /// <param name="queryMonth">月</param>
        /// <param name="queryDay">日</param>
        /// <param name="customID">会员ID</param>
        /// <param name="dsReservation">返回查询结果</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        DataSet QueryReservationCustom(int queryYear, int queryMonth, int queryDay, int customID);
        /// <summary>
        /// 查询预约与服务项目对应
        /// </summary>
        /// <param name="reservationID"></param>
        /// <returns></returns>
        DataSet QueryReservationServiceItem(int reservationID);
        /// <summary>
        /// 查询会员卡项预约情况
        /// </summary>
        /// <param name="customID">会员ID</param>
        /// <param name="customServiceItemID">会员服务项目ID</param>
        /// <returns></returns>
        DataSet QeuryReservationCustomServiceItem(int customID, int customServiceItemID);
        /// <summary>
        /// 查询会员卡预约情况
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        DataSet QueryReservationCustomServiceItemFilter(string filter);
        /// <summary>
        /// 根据预约ID查询详细项目
        /// </summary>
        /// <param name="reservationID">预约ＩＤ</param>
        /// <returns></returns>
        DataSet QueryReservationServiceItemDetail(int reservationID);
        /// <summary>
        /// 更新过期的预约状态
        /// </summary>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        void CheckAllReservationState();
        /// <summary>
        /// 根据预约ID更新预约状态
        /// </summary>
        /// <param name="reservationID"></param>
        /// <param name="reservationDateTime"></param>
        void UpdateReservationState(int reservationID,  DBEntityReservation reservation, DateTime dtReservationTime);
    }
}
